<template>
  <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body @close="cancel">

    <el-form ref="form" label-width="120px">
      <el-form-item label="服务内容：">
        <span>免押租借充电宝</span>
      </el-form-item>
      <el-form-item label="序列号：">
        <span>{{ orderObj.serialNumber }}</span>
      </el-form-item>
      <el-form-item label="收费标准：">
        <span>10元/小时，40元/24小时，封顶99元</span>
      </el-form-item>
      <el-form-item label="站点名称：">
        <span>{{ orderObj.stationName }}</span>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="handleOk">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import { rent } from '@/api/system/order'
  export default {
    name: "rentPromt",
    data() {
      return {
        title: '系统提示',
        orderObj: {},
        open: false,
      }
    },
    methods: {
      show(row) {
        this.open = true
        this.orderObj = row
      },
      handleOk() {
        rent({ treasureId:this.orderObj.treasureId,treasureSerialNumber:this.orderObj.serialNumber }).then(res => {
          this.$modal.msgSuccess("租借成功");
          this.open = false
          this.$emit('ok')
        })
      },
      cancel() {
        this.open = false
        this.$emit('close')
      },
    }
  }
</script>

<style scoped>

</style>

